<?php
require_once 'CMS/Util.php';
require_once 'CMS/Mvc/BaseController.php';
require_once 'CMS/Mvc/BaseUserController.php';
require_once 'CMS/UserCommon.php';
require_once 'CMS/Language.php';

//Người tạo : Hoàng Hải Luân - Team 4
//Module 	: Language
//Chức năng	: Show language
 
class Footer_IndexController {

	public function init(){
		parent::init();
	}

	public function indexAction(){
		
		/*========== Start Load Language ==========*/
		$lang = new Language(APPLICATION_PATH . '/widgets/footer');
		if(isset($_SESSION['language']))
		{
			$language_id = $_SESSION['language'];
			$tbLanguage = new Language_Model_Language();
			$name = $tbLanguage->getNameLanguage($language_id);
			$lang->load($name['name']);
		}
		else
			$lang->load('Default');		
		/*========== End Load Language ==========*/
		
		
		/*========== Start Get Text ==============*/
		$this->view->textHome		= $lang->get('text_home');
		$this->view->textProduct		= $lang->get('text_product');
		$this->view->textAccount		= $lang->get('text_account');
		$this->view->textContact		= $lang->get('text_contact');
		$this->view->textCheckout		= $lang->get('text_checkout');
		$this->view->textCopy		= $lang->get('text_copy');
		
		/*========== End Text ==============*/
	}
}